# 基础镜像
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/openjdk:8-jdk
# 接收构建参数
ARG APP_VERSION=prod
# 注入作者信息
LABEL maintainer="lineCode"
# 注入版本标签
LABEL org.opencontainers.image.version="${APP_VERSION}"

# 挂载目录
VOLUME /home/shorthand
# 创建目录
RUN mkdir -p /home/shorthand
# 指定路径
WORKDIR /home/shorthand
# 复制jar文件到路径
COPY ./jar/shorthand-auth.jar /home/shorthand/shorthand-auth.jar
# 启动认证服务
ENTRYPOINT ["java","-Xms128m", "-Xmx512m","-jar","shorthand-auth.jar", "--spring.profiles.active=prod"]